<template>
  <div>
    <a-modal :visible="visible" :destroyOnClose="true" title="新建任务" :footer="null" @cancel="close">
      <h3>日常基础</h3>
      <a-button type="primary" icon="plus" @click="handleAdd('sign')" ghost>每日签到</a-button>
      <a-button style="margin-left: 16px" type="primary" icon="plus" @click="handleAdd('comment')" ghost>订单评价</a-button>
      <br /><br />
      <h3>线上链路</h3>
      <a-button type="primary" icon="plus" @click="handleAdd('post')" ghost>社区发帖</a-button>
      <a-button style="margin-left: 16px" type="primary" icon="plus" @click="handleAdd('custom-links')" ghost>自定义跳转</a-button>
    </a-modal>
  </div>
</template>
<script>
export default {
  data() {
    return {
      visible: false
    }
  },
  methods: {
    close() {
      this.visible = false
    },
    show() {
      this.visible = true
    },
    handleAdd(name) {
      this.$router.push(`/marketingCenter/memberPromotions/memberTask/edit/add/${name}`)
      this.close()
    }
  }
}
</script>

